#ifndef DATABASE_H
#define DATABASE_H
#include <QHostAddress>
#include <QDebug>
#include <QHash>
#include <QtGlobal>
#include <QSqlQuery>
#include <QSqlDatabase>
#include <QSqlDriver>
#include <QSqlError>
#include <QSettings>
#include <QTextCodec>
#include "mc_uiprotocol.h"

#define FLINE __FILE__<<"Line:"<<__LINE__
#define MC_UI_CONFIG_FILE "mcuiconfig.ini"

QVariant get_mc_info(QString groupname , QString keyname);
bool connect_database();
bool query_database(QString statement, QSqlQuery &query);
bool exec_database(QString statement);

bool get_floor_devices(int devtype , int buildno , int floorno , QSqlQuery &query);

void init_test_database();
void delete_database();
#endif // DATABASE_H
